import matplotlib.pyplot as plt

# VGGNet data
vggnet_epochs = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
vggnet_train_loss = [0.6932, 0.6772, 0.6502, 0.6340, 0.6209, 0.6062, 0.5837, 0.5690, 0.5543, 0.5417,
                     0.5315, 0.5126, 0.4953, 0.4751, 0.4570, 0.4472, 0.4332, 0.4233, 0.4099, 0.3994]
vggnet_train_acc = [49.53, 56.69, 62.215, 64.62, 65.905, 67.64, 69.365, 70.265, 71.12, 72.67,
                    73.285, 74.355, 75.505, 77.545, 78.38, 79.025, 79.87, 80.37, 81.265, 82.25]

# ResNet50 data
resnet50_epochs = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
resnet50_train_loss = [0.3734, 0.3264, 0.3039, 0.2826, 0.2582, 0.2285, 0.1993, 0.1638, 0.1333, 0.1074,
                       0.0841, 0.0677, 0.0553, 0.0471, 0.0436, 0.0398, 0.0316, 0.0263, 0.0308, 0.0259]
resnet50_train_acc = [82.94, 85.515, 86.435, 87.72, 88.69, 90.205, 91.675, 93.415, 94.76, 96.0,
                      96.88, 97.615, 98.105, 98.43, 98.52, 98.71, 98.895, 99.175, 98.92, 99.15]

# Plotting the training loss
plt.figure(figsize=(10, 5))
plt.plot(vggnet_epochs, vggnet_train_loss, marker='o', label='VGGNet')
plt.plot(resnet50_epochs, resnet50_train_loss, marker='o', label='ResNet50')
plt.title('Training Loss Comparison')
plt.xlabel('Epochs')
plt.ylabel('Loss')
plt.legend()
plt.grid(True)
plt.show()

# Plotting the training accuracy
plt.figure(figsize=(10, 5))
plt.plot(vggnet_epochs, vggnet_train_acc, marker='o', label='VGGNet')
plt.plot(resnet50_epochs, resnet50_train_acc, marker='o', label='ResNet50')
plt.title('Training Accuracy Comparison')
plt.xlabel('Epochs')
plt.ylabel('Accuracy')
plt.legend()
plt.grid(True)
plt.show()
